<%-- 
    Document   : b2
    Created on : 2014/8/12, 上午 09:39:06
    Author     : Benny
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String user = request.getParameter("user");
    if(user!=null)
        session.setAttribute("user", user);
    session.setMaxInactiveInterval(10);//設定session閒置時間(以秒為單位)
    %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>B2</title>
    </head>
    <body>
        <h1>b2</h1>
        <hr>
        <%= session.getId() %><br>
        <a href="b1.jsp;jsessionid=<%= session.getId() %>">B1連結</a><br>
        <%= user %>
    </body>
</html>
